package concert;

import com.example.beans.SelfInvocation;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

@Configuration
// 使用@EnableAspectJAutoProxy注解启用自动代理
@EnableAspectJAutoProxy
public class AppConfig {

    @Bean
    public Audience audience(){
        return new Audience();
    }

    @Bean
    public Performance performance(){
        return new MusicPerformance();
    }

    @Bean
    public EncoreableIntroducer encoreableIntroducer(){
        return new EncoreableIntroducer();
    }

    @Bean
    public SelfInvocation selfInvocation(){
        return new SelfInvocation();
    }

    @Bean
    public SelfInvocationAspect selfInvocationAspect(){
        return new SelfInvocationAspect();
    }
}
